package com.star.basedemo.response;

import lombok.Data;

import java.util.List;

/**
 * 统一响应请求
 */
@Data
public class BaseResponse<T> {
    // 内容
    private List<T> content;
    // 响应码
    private Integer code;
    // 操作信息
    private String operate;

    private BaseResponse(){}

    /**
     *
     * @param code 响应码
     * @param content 响应内容
     * @param operate 操作信息 update insert delete select
     */
    public BaseResponse(Integer code,String operate,List<T> content){
        this.code = code;
        this.content = content;
        this.operate = operate;
    }
   public BaseResponse(Integer code,String operate){
        this.code = code;
        this.operate  = operate;
   }
}
